/* RGB lookup table
   duplicates Xwindows rgb.txt as a color name to integer RGB table
   H.Youngren 3/99
*/

typedef struct {
    char        *name;
    unsigned int rgb;
} Colordef;  

static Colordef colordef[] = {
"snow", 16775930,
"ghost white", 16316671,
"ghostwhite", 16316671,
"white smoke", 16119285,
"whitesmoke", 16119285,
"gainsboro", 14474460,
"floral white", 16775920,
"floralwhite", 16775920,
"old lace", 16643558,
"oldlace", 16643558,
"linen", 16445670,
"antique white", 16444375,
"antiquewhite", 16444375,
"papaya whip", 16773077,
"papayawhip", 16773077,
"blanched almond", 16772045,
"blanchedalmond", 16772045,
"bisque", 16770244,
"peach puff", 16767673,
"peachpuff", 16767673,
"navajo white", 16768685,
"navajowhite", 16768685,
"moccasin", 16770229,
"cornsilk", 16775388,
"ivory", 16777200,
"lemon chiffon", 16775885,
"lemonchiffon", 16775885,
"seashell", 16774638,
"honeydew", 15794160,
"mint cream", 16121850,
"mintcream", 16121850,
"azure", 15794175,
"alice blue", 15792383,
"aliceblue", 15792383,
"lavender", 15132410,
"lavender blush", 16773365,
"lavenderblush", 16773365,
"misty rose", 16770273,
"mistyrose", 16770273,
"white", 16777215,
"black", 0,
"dark slate gray", 3100495,
"darkslategray", 3100495,
"dark slate grey", 3100495,
"darkslategrey", 3100495,
"dim gray", 6908265,
"dimgray", 6908265,
"dim grey", 6908265,
"dimgrey", 6908265,
"slate gray", 7372944,
"slategray", 7372944,
"slate grey", 7372944,
"slategrey", 7372944,
"light slate gray", 7833753,
"lightslategray", 7833753,
"light slate grey", 7833753,
"lightslategrey", 7833753,
"gray", 12500670,
"grey", 12500670,
"light grey", 13882323,
"lightgrey", 13882323,
"light gray", 13882323,
"lightgray", 13882323,
"midnight blue", 1644912,
"midnightblue", 1644912,
"navy", 128,
"navy blue", 128,
"navyblue", 128,
"cornflower blue", 6591981,
"cornflowerblue", 6591981,
"dark slate blue", 4734347,
"darkslateblue", 4734347,
"slate blue", 6970061,
"slateblue", 6970061,
"medium slate blue", 8087790,
"mediumslateblue", 8087790,
"light slate blue", 8679679,
"lightslateblue", 8679679,
"medium blue", 205,
"mediumblue", 205,
"royal blue", 4286945,
"royalblue", 4286945,
"blue", 255,
"dodger blue", 2003199,
"dodgerblue", 2003199,
"deep sky blue", 49151,
"deepskyblue", 49151,
"sky blue", 8900331,
"skyblue", 8900331,
"light sky blue", 8900346,
"lightskyblue", 8900346,
"steel blue", 4620980,
"steelblue", 4620980,
"light steel blue", 11584734,
"lightsteelblue", 11584734,
"light blue", 11393254,
"lightblue", 11393254,
"powder blue", 11591910,
"powderblue", 11591910,
"pale turquoise", 11529966,
"paleturquoise", 11529966,
"dark turquoise", 52945,
"darkturquoise", 52945,
"medium turquoise", 4772300,
"mediumturquoise", 4772300,
"turquoise", 4251856,
"cyan", 65535,
"light cyan", 14745599,
"lightcyan", 14745599,
"cadet blue", 6266528,
"cadetblue", 6266528,
"medium aquamarine", 6737322,
"mediumaquamarine", 6737322,
"aquamarine", 8388564,
"dark green", 25600,
"darkgreen", 25600,
"dark olive green", 5597999,
"darkolivegreen", 5597999,
"dark sea green", 9419919,
"darkseagreen", 9419919,
"sea green", 3050327,
"seagreen", 3050327,
"medium sea green", 3978097,
"mediumseagreen", 3978097,
"light sea green", 2142890,
"lightseagreen", 2142890,
"pale green", 10025880,
"palegreen", 10025880,
"spring green", 65407,
"springgreen", 65407,
"lawn green", 8190976,
"lawngreen", 8190976,
"green", 65280,
"chartreuse", 8388352,
"medium spring green", 64154,
"mediumspringgreen", 64154,
"green yellow", 11403055,
"greenyellow", 11403055,
"lime green", 3329330,
"limegreen", 3329330,
"yellow green", 10145074,
"yellowgreen", 10145074,
"forest green", 2263842,
"forestgreen", 2263842,
"olive drab", 7048739,
"olivedrab", 7048739,
"dark khaki", 12433259,
"darkkhaki", 12433259,
"khaki", 15787660,
"pale goldenrod", 15657130,
"palegoldenrod", 15657130,
"light goldenrod yellow", 16448210,
"lightgoldenrodyellow", 16448210,
"light yellow", 16777184,
"lightyellow", 16777184,
"yellow", 16776960,
"gold", 16766720,
"light goldenrod", 15654274,
"lightgoldenrod", 15654274,
"goldenrod", 14329120,
"dark goldenrod", 12092939,
"darkgoldenrod", 12092939,
"rosy brown", 12357519,
"rosybrown", 12357519,
"indian red", 13458524,
"indianred", 13458524,
"saddle brown", 9127187,
"saddlebrown", 9127187,
"sienna", 10506797,
"peru", 13468991,
"burlywood", 14596231,
"beige", 16119260,
"wheat", 16113331,
"sandy brown", 16032864,
"sandybrown", 16032864,
"tan", 13808780,
"chocolate", 13789470,
"firebrick", 11674146,
"brown", 10824234,
"dark salmon", 15308410,
"darksalmon", 15308410,
"salmon", 16416882,
"light salmon", 16752762,
"lightsalmon", 16752762,
"orange", 16753920,
"dark orange", 16747520,
"darkorange", 16747520,
"coral", 16744272,
"light coral", 15761536,
"lightcoral", 15761536,
"tomato", 16737095,
"orange red", 16729344,
"orangered", 16729344,
"red", 16711680,
"hot pink", 16738740,
"hotpink", 16738740,
"deep pink", 16716947,
"deeppink", 16716947,
"pink", 16761035,
"light pink", 16758465,
"lightpink", 16758465,
"pale violet red", 14381203,
"palevioletred", 14381203,
"maroon", 11546720,
"medium violet red", 13047173,
"mediumvioletred", 13047173,
"violet red", 13639824,
"violetred", 13639824,
"magenta", 16711935,
"violet", 15631086,
"plum", 14524637,
"orchid", 14315734,
"medium orchid", 12211667,
"mediumorchid", 12211667,
"dark orchid", 10040012,
"darkorchid", 10040012,
"dark violet", 9699539,
"darkviolet", 9699539,
"blue violet", 9055202,
"blueviolet", 9055202,
"purple", 10494192,
"medium purple", 9662683,
"mediumpurple", 9662683,
"thistle", 14204888,
"snow1", 16775930,
"snow2", 15657449,
"snow3", 13486537,
"snow4", 9144713,
"seashell1", 16774638,
"seashell2", 15656414,
"seashell3", 13485503,
"seashell4", 9143938,
"antiquewhite1", 16773083,
"antiquewhite2", 15654860,
"antiquewhite3", 13484208,
"antiquewhite4", 9143160,
"bisque1", 16770244,
"bisque2", 15652279,
"bisque3", 13481886,
"bisque4", 9141611,
"peachpuff1", 16767673,
"peachpuff2", 15649709,
"peachpuff3", 13479829,
"peachpuff4", 9140069,
"navajowhite1", 16768685,
"navajowhite2", 15650721,
"navajowhite3", 13480843,
"navajowhite4", 9140574,
"lemonchiffon1", 16775885,
"lemonchiffon2", 15657407,
"lemonchiffon3", 13486501,
"lemonchiffon4", 9144688,
"cornsilk1", 16775388,
"cornsilk2", 15657165,
"cornsilk3", 13486257,
"cornsilk4", 9144440,
"ivory1", 16777200,
"ivory2", 15658720,
"ivory3", 13487553,
"ivory4", 9145219,
"honeydew1", 15794160,
"honeydew2", 14741216,
"honeydew3", 12701121,
"honeydew4", 8620931,
"lavenderblush1", 16773365,
"lavenderblush2", 15655141,
"lavenderblush3", 13484485,
"lavenderblush4", 9143174,
"mistyrose1", 16770273,
"mistyrose2", 15652306,
"mistyrose3", 13481909,
"mistyrose4", 9141627,
"azure1", 15794175,
"azure2", 14741230,
"azure3", 12701133,
"azure4", 8620939,
"slateblue1", 8613887,
"slateblue2", 8021998,
"slateblue3", 6904269,
"slateblue4", 4668555,
"royalblue1", 4749055,
"royalblue2", 4419310,
"royalblue3", 3825613,
"royalblue4", 2572427,
"blue1", 255,
"blue2", 238,
"blue3", 205,
"blue4", 139,
"dodgerblue1", 2003199,
"dodgerblue2", 1869550,
"dodgerblue3", 1602765,
"dodgerblue4", 1068683,
"steelblue1", 6535423,
"steelblue2", 6073582,
"steelblue3", 5215437,
"steelblue4", 3564683,
"deepskyblue1", 49151,
"deepskyblue2", 45806,
"deepskyblue3", 39629,
"deepskyblue4", 26763,
"skyblue1", 8900351,
"skyblue2", 8306926,
"skyblue3", 7120589,
"skyblue4", 4878475,
"lightskyblue1", 11592447,
"lightskyblue2", 10802158,
"lightskyblue3", 9287373,
"lightskyblue4", 6323083,
"slategray1", 13034239,
"slategray2", 12178414,
"slategray3", 10467021,
"slategray4", 7109515,
"lightsteelblue1", 13296127,
"lightsteelblue2", 12374766,
"lightsteelblue3", 10663373,
"lightsteelblue4", 7240587,
"lightblue1", 12578815,
"lightblue2", 11722734,
"lightblue3", 10141901,
"lightblue4", 6849419,
"lightcyan1", 14745599,
"lightcyan2", 13758190,
"lightcyan3", 11849165,
"lightcyan4", 8031115,
"paleturquoise1", 12320767,
"paleturquoise2", 11464430,
"paleturquoise3", 9883085,
"paleturquoise4", 6720395,
"cadetblue1", 10024447,
"cadetblue2", 9364974,
"cadetblue3", 8046029,
"cadetblue4", 5473931,
"turquoise1", 62975,
"turquoise2", 58862,
"turquoise3", 50637,
"turquoise4", 34443,
"cyan1", 65535,
"cyan2", 61166,
"cyan3", 52685,
"cyan4", 35723,
"darkslategray1", 9961471,
"darkslategray2", 9301742,
"darkslategray3", 7982541,
"darkslategray4", 5409675,
"aquamarine1", 8388564,
"aquamarine2", 7794374,
"aquamarine3", 6737322,
"aquamarine4", 4557684,
"darkseagreen1", 12713921,
"darkseagreen2", 11857588,
"darkseagreen3", 10210715,
"darkseagreen4", 6916969,
"seagreen1", 5570463,
"seagreen2", 5172884,
"seagreen3", 4443520,
"seagreen4", 3050327,
"palegreen1", 10157978,
"palegreen2", 9498256,
"palegreen3", 8179068,
"palegreen4", 5540692,
"springgreen1", 65407,
"springgreen2", 61046,
"springgreen3", 52582,
"springgreen4", 35653,
"green1", 65280,
"green2", 60928,
"green3", 52480,
"green4", 35584,
"chartreuse1", 8388352,
"chartreuse2", 7794176,
"chartreuse3", 6737152,
"chartreuse4", 4557568,
"olivedrab1", 12648254,
"olivedrab2", 11791930,
"olivedrab3", 10145074,
"olivedrab4", 6916898,
"darkolivegreen1", 13303664,
"darkolivegreen2", 12381800,
"darkolivegreen3", 10669402,
"darkolivegreen4", 7244605,
"khaki1", 16774799,
"khaki2", 15656581,
"khaki3", 13485683,
"khaki4", 9143886,
"lightgoldenrod1", 16772235,
"lightgoldenrod2", 15654018,
"lightgoldenrod3", 13483632,
"lightgoldenrod4", 9142604,
"lightyellow1", 16777184,
"lightyellow2", 15658705,
"lightyellow3", 13487540,
"lightyellow4", 9145210,
"yellow1", 16776960,
"yellow2", 15658496,
"yellow3", 13487360,
"yellow4", 9145088,
"gold1", 16766720,
"gold2", 15649024,
"gold3", 13479168,
"gold4", 9139456,
"goldenrod1", 16761125,
"goldenrod2", 15643682,
"goldenrod3", 13474589,
"goldenrod4", 9136404,
"darkgoldenrod1", 16759055,
"darkgoldenrod2", 15641870,
"darkgoldenrod3", 13473036,
"darkgoldenrod4", 9135368,
"rosybrown1", 16761281,
"rosybrown2", 15643828,
"rosybrown3", 13474715,
"rosybrown4", 9136489,
"indianred1", 16738922,
"indianred2", 15623011,
"indianred3", 13456725,
"indianred4", 9124410,
"sienna1", 16745031,
"sienna2", 15628610,
"sienna3", 13461561,
"sienna4", 9127718,
"burlywood1", 16765851,
"burlywood2", 15648145,
"burlywood3", 13478525,
"burlywood4", 9139029,
"wheat1", 16771002,
"wheat2", 15653038,
"wheat3", 13482646,
"wheat4", 9141862,
"tan1", 16753999,
"tan2", 15637065,
"tan3", 13468991,
"tan4", 9132587,
"chocolate1", 16744228,
"chocolate2", 15627809,
"chocolate3", 13461021,
"chocolate4", 9127187,
"firebrick1", 16724016,
"firebrick2", 15608876,
"firebrick3", 13444646,
"firebrick4", 9116186,
"brown1", 16728128,
"brown2", 15612731,
"brown3", 13447987,
"brown4", 9118499,
"salmon1", 16747625,
"salmon2", 15630946,
"salmon3", 13463636,
"salmon4", 9129017,
"lightsalmon1", 16752762,
"lightsalmon2", 15635826,
"lightsalmon3", 13468002,
"lightsalmon4", 9131842,
"orange1", 16753920,
"orange2", 15636992,
"orange3", 13468928,
"orange4", 9132544,
"darkorange1", 16744192,
"darkorange2", 15627776,
"darkorange3", 13460992,
"darkorange4", 9127168,
"coral1", 16740950,
"coral2", 15624784,
"coral3", 13458245,
"coral4", 9125423,
"tomato1", 16737095,
"tomato2", 15621186,
"tomato3", 13455161,
"tomato4", 9123366,
"orangered1", 16729344,
"orangered2", 15613952,
"orangered3", 13448960,
"orangered4", 9118976,
"red1", 16711680,
"red2", 15597568,
"red3", 13434880,
"red4", 9109504,
"deeppink1", 16716947,
"deeppink2", 15602313,
"deeppink3", 13439094,
"deeppink4", 9112144,
"hotpink1", 16740020,
"hotpink2", 15624871,
"hotpink3", 13459600,
"hotpink4", 9124450,
"pink1", 16758213,
"pink2", 15641016,
"pink3", 13472158,
"pink4", 9134956,
"lightpink1", 16756409,
"lightpink2", 15639213,
"lightpink3", 13470869,
"lightpink4", 9133925,
"palevioletred1", 16745131,
"palevioletred2", 15628703,
"palevioletred3", 13461641,
"palevioletred4", 9127773,
"maroon1", 16725171,
"maroon2", 15610023,
"maroon3", 13445520,
"maroon4", 9116770,
"violetred1", 16727702,
"violetred2", 15612556,
"violetred3", 13447800,
"violetred4", 9118290,
"magenta1", 16711935,
"magenta2", 15597806,
"magenta3", 13435085,
"magenta4", 9109643,
"orchid1", 16745466,
"orchid2", 15629033,
"orchid3", 13461961,
"orchid4", 9127817,
"plum1", 16759807,
"plum2", 15642350,
"plum3", 13473485,
"plum4", 9135755,
"mediumorchid1", 14706431,
"mediumorchid2", 13721582,
"mediumorchid3", 11817677,
"mediumorchid4", 8009611,
"darkorchid1", 12533503,
"darkorchid2", 11680494,
"darkorchid3", 10105549,
"darkorchid4", 6824587,
"purple1", 10170623,
"purple2", 9514222,
"purple3", 8201933,
"purple4", 5577355,
"mediumpurple1", 11240191,
"mediumpurple2", 10451438,
"mediumpurple3", 9005261,
"mediumpurple4", 6113163,
"thistle1", 16769535,
"thistle2", 15651566,
"thistle3", 13481421,
"thistle4", 9141131,
"gray0", 0,
"grey0", 0,
"gray1", 197379,
"grey1", 197379,
"gray2", 328965,
"grey2", 328965,
"gray3", 526344,
"grey3", 526344,
"gray4", 657930,
"grey4", 657930,
"gray5", 855309,
"grey5", 855309,
"gray6", 986895,
"grey6", 986895,
"gray7", 1184274,
"grey7", 1184274,
"gray8", 1315860,
"grey8", 1315860,
"gray9", 1513239,
"grey9", 1513239,
"gray10", 1710618,
"grey10", 1710618,
"gray11", 1842204,
"grey11", 1842204,
"gray12", 2039583,
"grey12", 2039583,
"gray13", 2171169,
"grey13", 2171169,
"gray14", 2368548,
"grey14", 2368548,
"gray15", 2500134,
"grey15", 2500134,
"gray16", 2697513,
"grey16", 2697513,
"gray17", 2829099,
"grey17", 2829099,
"gray18", 3026478,
"grey18", 3026478,
"gray19", 3158064,
"grey19", 3158064,
"gray20", 3355443,
"grey20", 3355443,
"gray21", 3552822,
"grey21", 3552822,
"gray22", 3684408,
"grey22", 3684408,
"gray23", 3881787,
"grey23", 3881787,
"gray24", 4013373,
"grey24", 4013373,
"gray25", 4210752,
"grey25", 4210752,
"gray26", 4342338,
"grey26", 4342338,
"gray27", 4539717,
"grey27", 4539717,
"gray28", 4671303,
"grey28", 4671303,
"gray29", 4868682,
"grey29", 4868682,
"gray30", 5066061,
"grey30", 5066061,
"gray31", 5197647,
"grey31", 5197647,
"gray32", 5395026,
"grey32", 5395026,
"gray33", 5526612,
"grey33", 5526612,
"gray34", 5723991,
"grey34", 5723991,
"gray35", 5855577,
"grey35", 5855577,
"gray36", 6052956,
"grey36", 6052956,
"gray37", 6184542,
"grey37", 6184542,
"gray38", 6381921,
"grey38", 6381921,
"gray39", 6513507,
"grey39", 6513507,
"gray40", 6710886,
"grey40", 6710886,
"gray41", 6908265,
"grey41", 6908265,
"gray42", 7039851,
"grey42", 7039851,
"gray43", 7237230,
"grey43", 7237230,
"gray44", 7368816,
"grey44", 7368816,
"gray45", 7566195,
"grey45", 7566195,
"gray46", 7697781,
"grey46", 7697781,
"gray47", 7895160,
"grey47", 7895160,
"gray48", 8026746,
"grey48", 8026746,
"gray49", 8224125,
"grey49", 8224125,
"gray50", 8355711,
"grey50", 8355711,
"gray51", 8553090,
"grey51", 8553090,
"gray52", 8750469,
"grey52", 8750469,
"gray53", 8882055,
"grey53", 8882055,
"gray54", 9079434,
"grey54", 9079434,
"gray55", 9211020,
"grey55", 9211020,
"gray56", 9408399,
"grey56", 9408399,
"gray57", 9539985,
"grey57", 9539985,
"gray58", 9737364,
"grey58", 9737364,
"gray59", 9868950,
"grey59", 9868950,
"gray60", 10066329,
"grey60", 10066329,
"gray61", 10263708,
"grey61", 10263708,
"gray62", 10395294,
"grey62", 10395294,
"gray63", 10592673,
"grey63", 10592673,
"gray64", 10724259,
"grey64", 10724259,
"gray65", 10921638,
"grey65", 10921638,
"gray66", 11053224,
"grey66", 11053224,
"gray67", 11250603,
"grey67", 11250603,
"gray68", 11382189,
"grey68", 11382189,
"gray69", 11579568,
"grey69", 11579568,
"gray70", 11776947,
"grey70", 11776947,
"gray71", 11908533,
"grey71", 11908533,
"gray72", 12105912,
"grey72", 12105912,
"gray73", 12237498,
"grey73", 12237498,
"gray74", 12434877,
"grey74", 12434877,
"gray75", 12566463,
"grey75", 12566463,
"gray76", 12763842,
"grey76", 12763842,
"gray77", 12895428,
"grey77", 12895428,
"gray78", 13092807,
"grey78", 13092807,
"gray79", 13224393,
"grey79", 13224393,
"gray80", 13421772,
"grey80", 13421772,
"gray81", 13619151,
"grey81", 13619151,
"gray82", 13750737,
"grey82", 13750737,
"gray83", 13948116,
"grey83", 13948116,
"gray84", 14079702,
"grey84", 14079702,
"gray85", 14277081,
"grey85", 14277081,
"gray86", 14408667,
"grey86", 14408667,
"gray87", 14606046,
"grey87", 14606046,
"gray88", 14737632,
"grey88", 14737632,
"gray89", 14935011,
"grey89", 14935011,
"gray90", 15066597,
"grey90", 15066597,
"gray91", 15263976,
"grey91", 15263976,
"gray92", 15461355,
"grey92", 15461355,
"gray93", 15592941,
"grey93", 15592941,
"gray94", 15790320,
"grey94", 15790320,
"gray95", 15921906,
"grey95", 15921906,
"gray96", 16119285,
"grey96", 16119285,
"gray97", 16250871,
"grey97", 16250871,
"gray98", 16448250,
"grey98", 16448250,
"gray99", 16579836,
"grey99", 16579836,
"gray100", 16777215,
"grey100", 16777215,
"dark grey", 11119017,
"darkgrey", 11119017,
"dark gray", 11119017,
"darkgray", 11119017,
"dark blue", 139,
"darkblue", 139,
"dark cyan", 35723,
"darkcyan", 35723,
"dark magenta", 9109643,
"darkmagenta", 9109643,
"dark red", 9109504,
"darkred", 9109504,
"light green", 9498256,
"lightgreen", 9498256
};

